<?php

namespace Common\Model;

use Think\Model;

class CurrencyModel extends Model {
    public static function newSelf()
    {
        return new self();
    }
    public function findOneById($id)
    {
        return $this->where(['id'=>$id])->find();
    }
    public function findRewardCurrency()
    {
        return $this->where(['reward_ratio'=>['gt',0]])->select();
    }
	public function getInfo($where=[])
	{
	    $info=$this->where($where)->select();
	    foreach ($info as $k=>$v)
	    {
	        $infos[$v['id']]=$v;
	    }
	    return $infos;
	}
}